.calculator {
    max-width: 400px;
    margin: 2rem auto;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.expression {
  height: 30px;
  font-size: 1.2rem;
  color: #666;
  text-align: right;
  padding: 0 10px;
  overflow: hidden;
}

.display {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: right;
    font-size: 2em;
    min-height: 60px;
    margin-top: 8px;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

button {
    padding: 20px;
    border: none;
    background: #e0e0e0;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #d0d0d0;
}

button[data-operator] {
    background: #ff9500;
    color: white;
}

button[data-operator]:hover {
    background: #ff7b00;
}

.func {
    background: #a6a6a6;
    color: white;
}

.span-2 {
    grid-column: span 2;
}